<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateAkbusGasYhTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('akbus_gas_yh', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->dateTime('date_time')->nullable()->comment('交易时间');
            $table->string('custom_type')->nullable()->comment('客户类型');
            $table->string('card_type')->nullable()->comment('卡类型');
            $table->string('card_num')->nullable()->comment('卡号');
            $table->string('license_plate_num')->nullable()->comment('车牌号');
            $table->string('consumption_type')->nullable()->comment('消费类型');
            $table->decimal('gas_volume', 10, 4)->nullable()->comment('加气体积');
            $table->decimal('gas_amt', 10, 2)->nullable()->comment('发生金额');
            $table->string('preferential_settlement')->nullable()->comment('优惠结算');
            $table->decimal('give_away_amt', 10, 2)->nullable()->comment('赠送金额');
            $table->decimal('preferential_amt', 10, 2)->nullable()->comment('优惠金额');
            $table->decimal('card_balance', 10, 2)->nullable()->comment('卡余额');
            $table->string('operator')->nullable()->comment('操作员');
            $table->dateTime('deduction_time')->nullable()->comment('扣费时间');
            $table->integer('status')->nullable()->comment('交易状态');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('akbus_gas_yh');
    }
}
